write statement

 The Put Statement
 The Put statement is used write data to a file opened in random mode. The syntax, as it applies to binary files is:


 Put [#]filenumber, [recnumber], varname


 The filenumber is any valid filenumber.


 Recnumber is the record position within the file which is written. The record position is "one-based", meaning the first record position in the file is 1, the second record position is 2, and so on. You can omit this entry, in which case the next record following the last Get or Put statement is written. If you omit the record number entry, you must still include the delimiting commas in the Put statement,

for example: Put #intRndEmpFileNbr, , mudtEmpRecord

Varname is the record variable from which the data will be written. The record variable is a variable defined on the UDT record structure as described above.

 

basic file handling by v. vanthana